#ifndef __FX_FRAME_H__
#define __FX_FRAME_H__

#include <stdint.h>

#define ARRAY_LEN(a) (sizeof(a) / sizeof(a[0]))

typedef struct __fx_frame
{
    uint32_t *write_data;
    uint32_t *read_data;
    uint16_t data_num;
    uint16_t data_interval_us;
    uint32_t prefix_delay_us;
    uint16_t suffix_delay_us;
    void (*prefix_callback)(struct __fx_frame *frame);
    void (*suffix_callback)(struct __fx_frame *frame);
} fx_frame_t;

void fx_frame_execute(fx_frame_t *frame);

void log_wrdata(uint32_t *wdata, uint32_t *rdata, uint16_t len);

#endif
